<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/9
 * Time: 15:07
 */

namespace Admin\Model;

use Common\Model\AdminModel;

class NewsModel extends AdminModel
{
    protected $_validate = array(
        array('news_tittle','require','必填项！'),
        array('news_content', 'require', '必填项'),
        array('news_type','require','必填项！'),
        array('news_author','require','必填项！'),
        array('news_type',array(1,2,3,4),'值的范围不正确！',3,'in'), // 当值不为空的时候判断是否在一个范围内
    );

    protected $patchValidate = true; //开启批量验证
}